﻿@model SeguriGasesERP.ViewModels.CarritoDeComprasViewModel


@{
    ViewBag.Title = "Index";
}

<script src="/Scripts/jquery-1.4.4.min.js" type="text/javascript"></script>




<h2>Review Cart</h2>

@using (Html.BeginForm("Confirmar", "CarritoDeCompras", FormMethod.Get))
{

<fieldset>
    <div class="editor-label">
            <label for="IdCliente">Cliente</label>
    </div>
    <div class="editor-field">   
            @Html.DropDownList("IdCliente", new SelectList(ViewBag.Clientes as System.Collections.IEnumerable, "ID", "NombreCliente"))
    </div>
    <div class="editor-label">
            <label for="IdSucursal">Sucursal</label>
        </div>

        <div class="editor-field">
            @Html.DropDownList("IdSucursal", new SelectList(ViewBag.Sucursales as System.Collections.IEnumerable, "ID", "Nombre"))
        </div>
    @if (ViewBag.Elementos > 0)
    {
         <input type="submit" value="Continuar" />
    }
</fieldset>
}

@if (ViewBag.Elementos > 0)
{
<table>
    <tr>
        <th>
           Producto
        </th>
        <th></th>
    </tr>

@foreach (var item in Model.ElementosCarrito)
{
    <tr id="row-@item.RecordId">
        
            <td>
               @item.Producto.Nombre
            </td>
            
          
            <td>
                <a href="CarritoDeCompras/QuitarDelCarrito/@item.RecordId" class="RemoveLink"> Quitar del Carrito </a>
            </td>
            
      
       
    </tr>
}



</table>
}
    

